<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>产品档案修改查询</title>
    <link rel="stylesheet" href="../../css/pintuer.css">
    <link rel="stylesheet" href="../../css/admin.css">
    <link rel="stylesheet" href="../../css/bootstrap.css">
    <style>
        input{
            border-top: none;
            border-left: none;
            border-right: none;
            border-bottom: black solid 1px;
        }
        table{
            border: 1px;
            cell-padding:0;
            cell-spacing:0;
            width: 80%;
            margin-top: 20px;
        }
        table thead{
            background-color:#b3d7ff ;
        }
        a{
            cursor: pointer;
        }
    </style>
</head>
<body>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/bootstrap-table1.15.3.js"></script>
<script>
    $(function () {
            $.ajax({
                url:'/dFile/selectByConState.action',
                type:'post',
                dataType:'json',
                data:'state=S001-1',
                success:function (data) {
                    var tb = $('#tb_query');
                    tb.empty();
                    for (var i = 0; i < data.length; i++) {
                        var tr = $("<tr>");

                        var PID = $("<td>");
                        var a = $("<a href='../product.html?pid="+data[i].PRODUCT_ID+"'>").text(data[i].PRODUCT_ID);
                        PID.append(a);
                        tr.append(PID);

                        var pname = $("<td>").text(data[i].PRODUCT_NAME);
                        tr.append(pname);

                        var type = $('<td>').text(data[i].TYPE === "Y001-1" ? "商品" : "物料");
                        tr.append(type);

                        var itype = $('<td>').text(data[i].FIRST_KIND_NAME);
                        tr.append(itype);

                        var iitype = $("<td>").text(data[i].SECOND_KIND_NAME);
                        tr.append(iitype);

                        var iiitype = $("<td>").text(data[i].THIRD_KIND_NAME);
                        tr.append(iiitype);

                        var resperson = $("<td>").text(data[i].RESPONSIBL_PERSON);
                        tr.append(resperson);

                        var doc = $('<td>');
                        var a = $('<a href="updProduct.html?id='+data[i].PRODUCT_ID+'">').text("档案变更");
                        doc.append(a);
                        tr.append(doc);

                        tb.append(tr);

                    }
                }
                });


    })
</script>
<div class="container-fluid">
    <table style="text-align: center;" class="table table-bordered table-hover table-striped table-condensed">
        <thead>
        <tr>
            <th>产品编号</th>
            <th>产品名称</th>
            <th>用途类型</th>
            <th>I级分类</th>
            <th>II级分类</th>
            <th>III级分类</th>
            <th>产品经理</th>
            <th>档案变更</th>
        </tr>
        </thead>
        <tbody id="tb_query">
        </tbody>
    </table>
</div>
</body>
</html>